import numpy as np
import pandas as pd
s = pd.Series(8,index=[1,2,3])
print(s)
s = pd.Series(np.arange(3),index=[4,5,6])
print(s)

data={'d':0,'a':2,'c':1}
s=pd.Series(data,index=['a','b','c','d'])
print(s)

data = np.arange(12).reshape(3,4)
df2 = pd.DataFrame(data,index=['a','b','c'],columns=['c1','c2','c3','c4'])
print(df2)

data = {'month':['January','February','March','April'],
        'income':[10000,30000,50000,40000],
        'tax':[500,1500,2500,2000]}
df3 = pd.DataFrame(data)
print(df3)

print('DataFrame的数据值：',df3.values)
print('DataFrame的列名：',df3.columns)
print('DataFrame的维度：',df3.ndim)
print('DataFrame的元素个数：',df3.size)
print('DataFrame的索引：',df3.index)